package cc.openhome;

/**
 * Created by Cai Ye on 2016/3/19.
 */
import java.util.Scanner;

public class CashApp1 {
    public static void main(String[] args) {
        CashCard1[]cards={
                new CashCard1("A001",500,0),
                new CashCard1("A002",300,0),
                new CashCard1("A003",1000,1)
        };

        Scanner scanner=new Scanner(System.in);
        for (CashCard1 card:cards){
            System.out.printf("为(%s,%d,%d)的储值:",card.number,card.balance,card.bonus);
            card.store(scanner.nextInt());
            System.out.printf("明细(%s,%d,%d)%n",card.number,card.balance,card.bonus);
        }
    }
}
